import { Component } from '@angular/core';
import {CommonModule} from '@angular/common';
import {FormsModule} from '@angular/forms';
import { MessageService } from '../message.service';


@Component({
  selector: 'app-messages',
  imports: [CommonModule, FormsModule],
  templateUrl: './messages.component.html',
  styleUrl: './messages.component.css'
})
export class MessagesComponent {
  constructor(public messageService: MessageService) {}

  // msgs:string[]=["hello","123"];

  ngOnInit(){

  }

  clearMsg():void{
    this.messageService.clear();
    console.log("clear it");
  }

}
